var express = require('express'); //引入express模块  
var app = express();

var bodyParser = require('body-parser'); //request对象解析
var cookieParser = require('cookie-parser'); //request操作cookie
app.use(bodyParser());
app.use(cookieParser());
var server = require('http').createServer(app);
// var io = require('socket.io').listen(server); //引入socket.io模块并绑定到服务器

var orm = require("./orm"); //连接数据库orm
app.use(orm);

var multipart = require('connect-multiparty'); // form-data,req.files
app.use(multipart());

var router = require("./router")(app); // 路由指定路径

server.listen(1518); //指定服务端口在1518